﻿
using com.iot.core.data;
using com.iot.core.data.entity;
using com.iot.core.manager.htctl;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace com.iot.core.boot
{
    public class MyContext 
    {
        [Comment("日志")]
        public HtActionLog MyLog { get; set; }
        [Comment("在线用户")]
        public HtUserLogin Su { get; set; }
        public void SetLogMemo(string msg)
        {
            if (MyLog != null)
            {
                MyLog.Memo = msg;
            }
        }
        
        public HtCtlActDto Action { get; set; }

        public object Pin { get; set; }
        public BaseEntity Deleted { get; set; }
        public List<BaseEntity> Deleteds { get; set; }=new List<BaseEntity>();

        public BaseEntity Inserted { get; set; }
        public List<BaseEntity> Inserteds { get; set; }=new List<BaseEntity>();

        private Object PIn;
        public MyContext()
        {
            this.Su = new HtUserLogin();
            this.MyLog = new HtActionLog();
        }

    }
}
